<div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5><span><vc:i18n name="申请信息" namespace="purchaseApplyDetail"></vc:i18n></span></h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-primary btn-sm" v-if="purchaseApplyDetailInfo.resOrderType == '10000'" v-on:click="_printPurchaseApply()"><span><vc:i18n name="打印" namespace="purchaseApplyDetail"></vc:i18n></span>
                        </button>
                        <button type="button" class="btn btn-primary btn-sm" v-on:click="_callBackListPurchaseApply()"><span><vc:i18n name="返回" namespace="purchaseApplyDetail"></vc:i18n></span>
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="申请单号" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">{{purchaseApplyDetailInfo.applyOrderId}}</label>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="申请人" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">{{purchaseApplyDetailInfo.userName}}</label>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="使用人" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">{{purchaseApplyDetailInfo.endUserName}}</label>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="联系电话" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">{{purchaseApplyDetailInfo.endUserTel}}</label>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="申请时间" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">{{purchaseApplyDetailInfo.createTime}}</label>
                            </div>
                        </div>
                        <div class="col-sm-4" v-if="purchaseApplyDetailInfo.resOrderType==10000 && purchaseApplyDetailInfo.warehousingWay==20000">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="参考总价格" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">￥{{purchaseApplyDetailInfo.totalPrice}}</label>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="审批状态" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">{{purchaseApplyDetailInfo.stateName}}</label>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="col-form-label">{{purchaseApplyDetailInfo.resOrderType==10000 ? '入库方式' :
                                    '出库方式'}}：</label>
                                <label class="">{{purchaseApplyDetailInfo.resOrderType==10000 ?
                                    (purchaseApplyDetailInfo.warehousingWay==10000 ? '直接入库' :
                                    purchaseApplyDetailInfo.warehousingWay==20000 ? '采购入库' : '紧急采购') :
                                    (purchaseApplyDetailInfo.warehousingWay==10000 ? '直接出库' : '审核出库')}}</label>
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="说明" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">{{purchaseApplyDetailInfo.description}}</label>
                            </div>
                        </div>
                        <div class="col-sm-4" v-if="purchaseApplyDetailInfo.resOrderType==10000">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="参考采购总价格" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">{{purchaseApplyDetailInfo.totalPrice > 0 ? '￥' +
                                    purchaseApplyDetailInfo.totalPrice : '-'}}</label>
                            </div>
                        </div>
                        <div class="col-sm-4" v-if="purchaseApplyDetailInfo.resOrderType==10000">
                            <div class="form-group">
                                <label class="col-form-label"><span><vc:i18n name="实际采购总价格" namespace="purchaseApplyDetail"></vc:i18n></span>：</label>
                                <label class="">{{purchaseApplyDetailInfo.purchaseTotalPrice > 0 ? '￥' +
                                    purchaseApplyDetailInfo.purchaseTotalPrice : '-'}}</label>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5><span><vc:i18n name="申请物资" namespace="purchaseApplyDetail"></vc:i18n></span></h5>
                </div>
                <div class="ibox-content">
                    <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                            <tr>
                                <th class="text-center"><span><vc:i18n name="物品类型" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="物品名称" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="物品所属仓库" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="物品规格" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="供应商" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="物品编码" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="是否是固定物品" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="参考单价" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="原有库存" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="现有库存" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="申请数量" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="申请备注" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center" v-if="purchaseApplyDetailInfo.resOrderType==10000"><span><vc:i18n name="采购单价" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th class="text-center">{{purchaseApplyDetailInfo.resOrderType==10000 ? '采购数量' : '领用数量'}}</th>
                                <th class="text-center">{{purchaseApplyDetailInfo.resOrderType==10000 ? '采购备注' : '领用备注'}}
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="resourceStore in purchaseApplyDetailInfo.purchaseApplyDetailVo">
                                <td class="text-center">{{resourceStore.parentRstName}} > {{resourceStore.rstName}}</td>
                                <td class="text-center">{{resourceStore.resName}}</td>
                                <td class="text-center">{{resourceStore.shName}}</td>
                                <td class="text-center">{{resourceStore.specName ? resourceStore.specName : '-'}}</td>
                                <td class="text-center">
                                    {{resourceStore.supplierName ? resourceStore.supplierName : '-'}}
                                </td>
                                <td class="text-center">{{resourceStore.resCode}}</td>
                                <td class="text-center">{{resourceStore.isFixedName}}</td>
                                <td class="text-center">￥{{resourceStore.price}}</td>
                                <td class="text-center">{{resourceStore.originalStock}}{{resourceStore.unitCodeName}}</td>
                                <td class="text-center">{{resourceStore.stock}}{{resourceStore.unitCodeName}}</td>
                                <td class="text-center">{{resourceStore.quantity}}{{resourceStore.unitCodeName}}</td>
                                <td class="text-center">{{resourceStore.remark}}</td>
                                <td class="text-center" v-if="purchaseApplyDetailInfo.resOrderType==10000">
                                    {{resourceStore.purchasePrice ? '￥' + resourceStore.purchasePrice : '-'}}
                                </td>
                                <td class="text-center">
                                    {{resourceStore.purchaseQuantity? resourceStore.purchaseQuantity+resourceStore.unitCodeName: '-'}}
                                </td>
                                <td class="text-center">
                                    {{resourceStore.purchaseRemark? resourceStore.purchaseRemark :'-'}}
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="14">
                                    <ul class="pagination float-right"></ul>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="row" v-if="purchaseApplyDetailInfo.warehousingWay == 20000">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5><span><vc:i18n name="工单流转" namespace="purchaseApplyDetail"></vc:i18n></span></h5>
                    <div class="ibox-tools" style="top:10px;">
                    </div>
                </div>
                <div class="ibox-content">
                    <table class="table table-stripped">
                        <thead>
                            <tr>
                                <th scope="col"><span><vc:i18n name="序号" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th scope="col"><span><vc:i18n name="处理人" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th scope="col"><span><vc:i18n name="状态" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th scope="col"><span><vc:i18n name="处理时间" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th scope="col"><span><vc:i18n name="耗时" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                                <th scope="col"><span><vc:i18n name="意见" namespace="purchaseApplyDetail"></vc:i18n></span></th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(tItem,index) in purchaseApplyDetailInfo.auditUsers">
                                <td>{{index+1}}</td>
                                <td>{{tItem.userName?tItem.userName:tItem.auditName}}</td>
                                <td>{{tItem.stateName}}</td>
                                <td>{{tItem.auditTime}}</td>
                                <td>{{tItem.duration}}</td>
                                <td>{{tItem.message}}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
